package com.neu.converter;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.core.SimpleAliasRegistry;
import org.springframework.core.convert.converter.Converter;

public class DateConverter implements Converter<String, Date>{

	@Override
	public Date convert(String param) {
		SimpleDateFormat fmt=new SimpleDateFormat("yyyy-MM-dd");
		try {
			Date date=fmt.parse(param);
			return date;
		} catch (ParseException e) {
			e.printStackTrace();
		}
		return null;
	}

}
